package com.hyt.it.ogt.ks.enums.log;

import lombok.Getter;

/**
 * @author wuyingge
 * @version 1.0.0
 * @ClassName CandidateEventType.java
 * @Description 考生的事件轨迹大类型
 * @createTime 2022年11月24日 17:23:00
 */
@Getter
public enum LogEventType {
    ALL_LOG(0, "全部记录"),
    ANSWER_LOG(100, "答题记录"),
    ALERT_LOG(200, "预警记录"),
    OPERATOR_LOG(300, "考生操作"),
    EXAMINATION_LOG(400, "监考员操作"),
    OTHER_LOG(500, "其他记录");

    private Integer code;
    private String msg;

    LogEventType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public static String getMsg(Integer code) {
        for (LogEventType value : LogEventType.values()) {
            if(value.getCode().equals(code)) {
                return value.getMsg();
            }
        }
        return null;
    }
}
